package com.ship.dto;

import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/*接受前端参数 进行参数验证*/
@Data
public class AccountDto {
    @NotNull
    @Pattern(regexp = "\\w{4,20}")  //相当于  a-zA-Z0-9
    private String username;

    @NotNull
//    @Pattern(regexp = "\\d{6}")
    private String pwd;

    @NotNull
    private String email;

    @NotNull
    @Pattern(regexp = "[a-zA-Z0-9]{6}")
    private String captcha;
}
